| Index: src/hydrogen.cc
|
| ===================================================================
|
| --- src/hydrogen.cc (revision 8931)
|
| +++ src/hydrogen.cc (working copy)
|
| @@ -2480,6 +2480,9 @@
|
| ASSERT(!HasStackOverflow());
|
| ASSERT(current_block() != NULL);
|
| ASSERT(current_block()->HasPredecessor());
|
| + if (stmt->block_scope() != NULL) {
|
| + return Bailout("ScopedBlock");
|
| + }
|
| BreakAndContinueInfo break_info(stmt);
|
| { BreakAndContinueScope push(&break_info, this);
|
| CHECK_BAILOUT(VisitStatements(stmt->statements()));
|
| @@ -2631,12 +2634,11 @@
|
| }
|
|
|
|
|
| -void HGraphBuilder::VisitEnterWithContextStatement(
|
| - EnterWithContextStatement* stmt) {
|
| +void HGraphBuilder::VisitWithStatement(WithStatement* stmt) {
|
| ASSERT(!HasStackOverflow());
|
| ASSERT(current_block() != NULL);
|
| ASSERT(current_block()->HasPredecessor());
|
| - return Bailout("EnterWithContextStatement");
|
| + return Bailout("WithStatement");
|
| }
|
|
|
|
|
| @@ -3940,7 +3942,7 @@
|
| HInstruction* length = NULL;
|
| HInstruction* checked_key = NULL;
|
| if (map->has_external_array_elements()) {
|
| - length = AddInstruction(new(zone()) HExternalArrayLength(elements));
|
| + length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements));
|
| checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length));
|
| HLoadExternalArrayPointer* external_elements =
|
| new(zone()) HLoadExternalArrayPointer(elements);
|
| @@ -3952,7 +3954,7 @@
|
| if (map->instance_type() == JS_ARRAY_TYPE) {
|
| length = AddInstruction(new(zone()) HJSArrayLength(object, mapcheck));
|
| } else {
|
| - length = AddInstruction(new(zone()) HFixedArrayLength(elements));
|
| + length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements));
|
| }
|
| checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length));
|
| if (is_store) {
|
| @@ -4024,7 +4026,7 @@
|
| if (elements_kind == JSObject::FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND
|
| && todo_external_array) {
|
| HInstruction* length =
|
| - AddInstruction(new(zone()) HExternalArrayLength(elements));
|
| + AddInstruction(new(zone()) HFixedArrayBaseLength(elements));
|
| checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length));
|
| external_elements = new(zone()) HLoadExternalArrayPointer(elements);
|
| AddInstruction(external_elements);
|
| @@ -4088,7 +4090,7 @@
|
| if_jsarray->Goto(join);
|
|
|
| set_current_block(if_fastobject);
|
| - length = AddInstruction(new(zone()) HFixedArrayLength(elements));
|
| + length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements));
|
| checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length));
|
| if (is_store) {
|
| if (fast_double_elements) {
|
| @@ -4762,11 +4764,18 @@
|
| Property* prop = callee->AsProperty();
|
| ASSERT(prop != NULL);
|
|
|
| + if (!expr->IsMonomorphic() || expr->check_type() != RECEIVER_MAP_CHECK) {
|
| + return false;
|
| + }
|
| + Handle<Map> function_map = expr->GetReceiverTypes()->first();
|
| + if (function_map->instance_type() != JS_FUNCTION_TYPE ||
|
| + !expr->target()->shared()->HasBuiltinFunctionId() ||
|
| + expr->target()->shared()->builtin_function_id() != kFunctionApply) {
|
| + return false;
|
| + }
|
| +
|
| if (info()->scope()->arguments() == NULL) return false;
|
|
|
| - Handle<String> name = prop->key()->AsLiteral()->AsPropertyName();
|
| - if (!name->IsEqualTo(CStrVector("apply"))) return false;
|
| -
|
| ZoneList<Expression*>* args = expr->arguments();
|
| if (args->length() != 2) return false;
|
|
|
| @@ -4775,9 +4784,6 @@
|
| HValue* arg_two_value = environment()->Lookup(arg_two->var());
|
| if (!arg_two_value->CheckFlag(HValue::kIsArguments)) return false;
|
|
|
| - if (!expr->IsMonomorphic() ||
|
| - expr->check_type() != RECEIVER_MAP_CHECK) return false;
|
| -
|
| // Our implementation of arguments (based on this stack frame or an
|
| // adapter below it) does not work for inlined functions.
|
| if (function_state()->outer() != NULL) {
|
| @@ -4794,10 +4800,7 @@
|
| HValue* receiver = Pop();
|
| HInstruction* elements = AddInstruction(new(zone()) HArgumentsElements);
|
| HInstruction* length = AddInstruction(new(zone()) HArgumentsLength(elements));
|
| - AddCheckConstantFunction(expr,
|
| - function,
|
| - expr->GetReceiverTypes()->first(),
|
| - true);
|
| + AddCheckConstantFunction(expr, function, function_map, true);
|
| HInstruction* result =
|
| new(zone()) HApplyArguments(function, receiver, length, elements);
|
| result->set_position(expr->position());
|
|
|