Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: src/x64/codegen-x64.cc

Issue 1992003: Allocate the right number of fast context slots on X64. Ported from ia32.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698