| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 // Possibly allocate a local context. | 173 // Possibly allocate a local context. |
| 174 if (info()->scope()->NeedsContext()) { | 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()->scope_info()); |
| 183 __ CallRuntime(Runtime::kNewScriptContext); | 183 __ CallRuntime(Runtime::kNewScriptContext); |
| 184 deopt_mode = Safepoint::kLazyDeopt; | 184 deopt_mode = Safepoint::kLazyDeopt; |
| 185 } else { | 185 } else { |
| 186 FastNewFunctionContextStub stub(isolate()); | 186 FastNewFunctionContextStub stub(isolate()); |
| 187 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 187 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); |
| 188 __ CallStub(&stub); | 188 __ CallStub(&stub); |
| 189 // Result of FastNewFunctionContextStub is always in new space. | 189 // Result of FastNewFunctionContextStub is always in new space. |
| 190 need_write_barrier = false; | 190 need_write_barrier = false; |
| 191 } | 191 } |
| 192 RecordSafepoint(deopt_mode); | 192 RecordSafepoint(deopt_mode); |
| (...skipping 5343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5536 __ lw(result, FieldMemOperand(scratch, | 5536 __ lw(result, FieldMemOperand(scratch, |
| 5537 FixedArray::kHeaderSize - kPointerSize)); | 5537 FixedArray::kHeaderSize - kPointerSize)); |
| 5538 __ bind(deferred->exit()); | 5538 __ bind(deferred->exit()); |
| 5539 __ bind(&done); | 5539 __ bind(&done); |
| 5540 } | 5540 } |
| 5541 | 5541 |
| 5542 #undef __ | 5542 #undef __ |
| 5543 | 5543 |
| 5544 } // namespace internal | 5544 } // namespace internal |
| 5545 } // namespace v8 | 5545 } // namespace v8 |
| OLD | NEW |