| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2235 // Push the start position of the scope the calls resides in. | 2235 // Push the start position of the scope the calls resides in. |
| 2236 __ mov(r1, Operand(Smi::FromInt(scope()->start_position()))); | 2236 __ mov(r1, Operand(Smi::FromInt(scope()->start_position()))); |
| 2237 __ push(r1); | 2237 __ push(r1); |
| 2238 | 2238 |
| 2239 // Do the runtime call. | 2239 // Do the runtime call. |
| 2240 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); | 2240 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); |
| 2241 } | 2241 } |
| 2242 | 2242 |
| 2243 | 2243 |
| 2244 void FullCodeGenerator::VisitCall(Call* expr) { | 2244 void FullCodeGenerator::VisitCall(Call* expr) { |
| 2245 ImmediateReturnDisabled disable(this); |
| 2245 #ifdef DEBUG | 2246 #ifdef DEBUG |
| 2246 // We want to verify that RecordJSReturnSite gets called on all paths | 2247 // We want to verify that RecordJSReturnSite gets called on all paths |
| 2247 // through this function. Avoid early returns. | 2248 // through this function. Avoid early returns. |
| 2248 expr->return_is_recorded_ = false; | 2249 expr->return_is_recorded_ = false; |
| 2249 #endif | 2250 #endif |
| 2250 | 2251 |
| 2251 Comment cmnt(masm_, "[ Call"); | 2252 Comment cmnt(masm_, "[ Call"); |
| 2252 Expression* callee = expr->expression(); | 2253 Expression* callee = expr->expression(); |
| 2253 VariableProxy* proxy = callee->AsVariableProxy(); | 2254 VariableProxy* proxy = callee->AsVariableProxy(); |
| 2254 Property* property = callee->AsProperty(); | 2255 Property* property = callee->AsProperty(); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 } | 2362 } |
| 2362 | 2363 |
| 2363 #ifdef DEBUG | 2364 #ifdef DEBUG |
| 2364 // RecordJSReturnSite should have been called. | 2365 // RecordJSReturnSite should have been called. |
| 2365 ASSERT(expr->return_is_recorded_); | 2366 ASSERT(expr->return_is_recorded_); |
| 2366 #endif | 2367 #endif |
| 2367 } | 2368 } |
| 2368 | 2369 |
| 2369 | 2370 |
| 2370 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 2371 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
| 2372 ImmediateReturnDisabled disable(this); |
| 2371 Comment cmnt(masm_, "[ CallNew"); | 2373 Comment cmnt(masm_, "[ CallNew"); |
| 2372 // According to ECMA-262, section 11.2.2, page 44, the function | 2374 // According to ECMA-262, section 11.2.2, page 44, the function |
| 2373 // expression in new calls must be evaluated before the | 2375 // expression in new calls must be evaluated before the |
| 2374 // arguments. | 2376 // arguments. |
| 2375 | 2377 |
| 2376 // Push constructor on the stack. If it's not a function it's used as | 2378 // Push constructor on the stack. If it's not a function it's used as |
| 2377 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is | 2379 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is |
| 2378 // ignored. | 2380 // ignored. |
| 2379 VisitForStackValue(expr->expression()); | 2381 VisitForStackValue(expr->expression()); |
| 2380 | 2382 |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3747 __ b(&done); | 3749 __ b(&done); |
| 3748 | 3750 |
| 3749 __ bind(&bailout); | 3751 __ bind(&bailout); |
| 3750 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 3752 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 3751 __ bind(&done); | 3753 __ bind(&done); |
| 3752 context()->Plug(r0); | 3754 context()->Plug(r0); |
| 3753 } | 3755 } |
| 3754 | 3756 |
| 3755 | 3757 |
| 3756 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { | 3758 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
| 3759 ImmediateReturnDisabled disable(this); |
| 3757 Handle<String> name = expr->name(); | 3760 Handle<String> name = expr->name(); |
| 3758 if (name->length() > 0 && name->Get(0) == '_') { | 3761 if (name->length() > 0 && name->Get(0) == '_') { |
| 3759 Comment cmnt(masm_, "[ InlineRuntimeCall"); | 3762 Comment cmnt(masm_, "[ InlineRuntimeCall"); |
| 3760 EmitInlineRuntimeCall(expr); | 3763 EmitInlineRuntimeCall(expr); |
| 3761 return; | 3764 return; |
| 3762 } | 3765 } |
| 3763 | 3766 |
| 3764 Comment cmnt(masm_, "[ CallRuntime"); | 3767 Comment cmnt(masm_, "[ CallRuntime"); |
| 3765 ZoneList<Expression*>* args = expr->arguments(); | 3768 ZoneList<Expression*>* args = expr->arguments(); |
| 3766 | 3769 |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4462 *context_length = 0; | 4465 *context_length = 0; |
| 4463 return previous_; | 4466 return previous_; |
| 4464 } | 4467 } |
| 4465 | 4468 |
| 4466 | 4469 |
| 4467 #undef __ | 4470 #undef __ |
| 4468 | 4471 |
| 4469 } } // namespace v8::internal | 4472 } } // namespace v8::internal |
| 4470 | 4473 |
| 4471 #endif // V8_TARGET_ARCH_ARM | 4474 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |