| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 SaveCallerDoubles(); | 164 SaveCallerDoubles(); |
| 165 } | 165 } |
| 166 return !is_aborted(); | 166 return !is_aborted(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 | 169 |
| 170 void LCodeGen::DoPrologue(LPrologue* instr) { | 170 void LCodeGen::DoPrologue(LPrologue* instr) { |
| 171 Comment(";;; Prologue begin"); | 171 Comment(";;; Prologue begin"); |
| 172 | 172 |
| 173 // Possibly allocate a local context. | 173 // Possibly allocate a local context. |
| 174 if (info()->scope()->num_heap_slots() > 0) { | 174 if (info()->scope()->NeedsContext()) { |
| 175 Comment(";;; Allocate local context"); | 175 Comment(";;; Allocate local context"); |
| 176 bool need_write_barrier = true; | 176 bool need_write_barrier = true; |
| 177 // Argument to NewContext is the function, which is in a1. | 177 // Argument to NewContext is the function, which is in a1. |
| 178 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 178 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 179 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 179 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 180 if (info()->scope()->is_script_scope()) { | 180 if (info()->scope()->is_script_scope()) { |
| 181 __ push(a1); | 181 __ push(a1); |
| 182 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 182 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
| 183 __ CallRuntime(Runtime::kNewScriptContext); | 183 __ CallRuntime(Runtime::kNewScriptContext); |
| 184 deopt_mode = Safepoint::kLazyDeopt; | 184 deopt_mode = Safepoint::kLazyDeopt; |
| (...skipping 5349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5534 __ lw(result, FieldMemOperand(scratch, | 5534 __ lw(result, FieldMemOperand(scratch, |
| 5535 FixedArray::kHeaderSize - kPointerSize)); | 5535 FixedArray::kHeaderSize - kPointerSize)); |
| 5536 __ bind(deferred->exit()); | 5536 __ bind(deferred->exit()); |
| 5537 __ bind(&done); | 5537 __ bind(&done); |
| 5538 } | 5538 } |
| 5539 | 5539 |
| 5540 #undef __ | 5540 #undef __ |
| 5541 | 5541 |
| 5542 } // namespace internal | 5542 } // namespace internal |
| 5543 } // namespace v8 | 5543 } // namespace v8 |
| OLD | NEW |