| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // rsi: callee's context | 353 // rsi: callee's context |
| 354 allocator_->Initialize(); | 354 allocator_->Initialize(); |
| 355 | 355 |
| 356 if (info->mode() == CompilationInfo::PRIMARY) { | 356 if (info->mode() == CompilationInfo::PRIMARY) { |
| 357 frame_->Enter(); | 357 frame_->Enter(); |
| 358 | 358 |
| 359 // Allocate space for locals and initialize them. | 359 // Allocate space for locals and initialize them. |
| 360 frame_->AllocateStackSlots(); | 360 frame_->AllocateStackSlots(); |
| 361 | 361 |
| 362 // Allocate the local context if needed. | 362 // Allocate the local context if needed. |
| 363 int heap_slots = scope()->num_heap_slots(); | 363 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 364 if (heap_slots > 0) { | 364 if (heap_slots > 0) { |
| 365 Comment cmnt(masm_, "[ allocate local context"); | 365 Comment cmnt(masm_, "[ allocate local context"); |
| 366 // Allocate local context. | 366 // Allocate local context. |
| 367 // Get outer context and create a new context based on it. | 367 // Get outer context and create a new context based on it. |
| 368 frame_->PushFunction(); | 368 frame_->PushFunction(); |
| 369 Result context; | 369 Result context; |
| 370 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 370 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
| 371 FastNewContextStub stub(heap_slots); | 371 FastNewContextStub stub(heap_slots); |
| 372 context = frame_->CallStub(&stub, 1); | 372 context = frame_->CallStub(&stub, 1); |
| 373 } else { | 373 } else { |
| (...skipping 11083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11457 // Call the function from C++. | 11457 // Call the function from C++. |
| 11458 return FUNCTION_CAST<ModuloFunction>(buffer); | 11458 return FUNCTION_CAST<ModuloFunction>(buffer); |
| 11459 } | 11459 } |
| 11460 | 11460 |
| 11461 #endif | 11461 #endif |
| 11462 | 11462 |
| 11463 | 11463 |
| 11464 #undef __ | 11464 #undef __ |
| 11465 | 11465 |
| 11466 } } // namespace v8::internal | 11466 } } // namespace v8::internal |
| OLD | NEW |