Version 1.4.2
svn merge -r 36348:36347 https://dart.googlecode.com/svn/branches/bleeding_edge 1.4
svn merge -c 36438 https://dart.googlecode.com/svn/branches/bleeding_edge 1.4
svn merge -c 36643 https://dart.googlecode.com/svn/branches/bleeding_edge 1.4
R=kasperl@google.com
Review URL: https://codereview.chromium.org//302703002
git-svn-id: http://dart.googlecode.com/svn/branches/1.4@36647 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 8cba49d..15f6340 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -391,7 +391,7 @@
if (strncmp(argv[i], kPackageRoot, strlen(kPackageRoot)) == 0) {
if (!ProcessPackageRootOption(argv[i] + strlen(kPackageRoot))) {
i++;
- if (!ProcessPackageRootOption(argv[i])) {
+ if ((argv[i] == NULL) || !ProcessPackageRootOption(argv[i])) {
Log::PrintErr("Invalid option specification : '%s'\n", argv[i - 1]);
i++;
break;
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
index 7ff08a9..d8e9245 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
@@ -212,7 +212,7 @@
jsAst.Expression value = new jsAst.Call(
new jsAst.PropertyAccess.field(
new jsAst.VariableUse(namer.isolateName),
- namer.getMappedInstanceName('makeConstantList')),
+ 'makeConstantList'),
[new jsAst.ArrayInitializer.from(_array(constant.entries))]);
return maybeAddTypeArguments(constant.type, value);
}
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
index 2f7dc05..5d29b6b 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
@@ -135,8 +135,6 @@
String get lazyInitializerName
=> '${namer.isolateName}.\$lazy';
String get initName => 'init';
- String get makeConstListProperty
- => namer.getMappedInstanceName('makeConstantList');
jsAst.FunctionDeclaration get generateAccessorFunction {
const RANGE1_SIZE = RANGE1_LAST - RANGE1_FIRST + 1;
@@ -540,7 +538,7 @@
if (#)
Isolate.$finishClassesProperty = oldIsolate.$finishClassesProperty;
if (#)
- Isolate.$makeConstListProperty = oldIsolate.$makeConstListProperty;
+ Isolate.makeConstantList = oldIsolate.makeConstantList;
return Isolate;
}''',
[ needsDefineClass, hasMakeConstantList ]);
@@ -958,16 +956,14 @@
void emitMakeConstantListIfNotEmitted(CodeBuffer buffer) {
if (hasMakeConstantList) return;
hasMakeConstantList = true;
- jsAst.Statement value = new jsAst.ExpressionStatement(new jsAst.Assignment(
- new jsAst.PropertyAccess.field(
- new jsAst.VariableUse(namer.isolateName),
- makeConstListProperty),
- js('''function(list) {
- list.immutable\$list = $initName;
- list.fixed\$length = $initName;
- return list;
- }''')));
- buffer.write(jsAst.prettyPrint(value, compiler));
+ buffer
+ ..write(namer.isolateName)
+ ..write('''.makeConstantList = function(list) {
+ list.immutable\$list = $initName;
+ list.fixed\$length = $initName;
+ return list;
+};
+''');
}
/// Returns the code equivalent to:
diff --git a/tools/VERSION b/tools/VERSION
index 0a41326..a8911eb 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -26,6 +26,6 @@
CHANNEL stable
MAJOR 1
MINOR 4
-PATCH 1
+PATCH 2
PRERELEASE 0
PRERELEASE_PATCH 0