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

Unified Diff: src/x64/virtual-frame-x64.cc

Issue 196139: X64: Convert smis to holding 32 bits of payload. (Closed)
Patch Set: Addressed review comments. Forwarded to head. Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/virtual-frame-x64.h ('k') | test/cctest/SConscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/virtual-frame-x64.cc
diff --git a/src/x64/virtual-frame-x64.cc b/src/x64/virtual-frame-x64.cc
index 0726b50f6c6e3551dd1f543d044203425b56b300..fcb7463b65a3694f2b2d59f43af1eb4bb76dbe4f 100644
--- a/src/x64/virtual-frame-x64.cc
+++ b/src/x64/virtual-frame-x64.cc
@@ -65,7 +65,7 @@ void VirtualFrame::Enter() {
#ifdef DEBUG
// Verify that rdi contains a JS function. The following code
// relies on rax being available for use.
- Condition not_smi = masm()->CheckNotSmi(rdi);
+ Condition not_smi = NegateCondition(masm()->CheckSmi(rdi));
__ Check(not_smi,
"VirtualFrame::Enter - rdi is not a function (smi check).");
__ CmpObjectType(rdi, JS_FUNCTION_TYPE, rax);
@@ -197,6 +197,14 @@ void VirtualFrame::EmitPush(Immediate immediate) {
}
+void VirtualFrame::EmitPush(Smi* smi_value) {
+ ASSERT(stack_pointer_ == element_count() - 1);
+ elements_.Add(FrameElement::MemoryElement());
+ stack_pointer_++;
+ __ Push(smi_value);
+}
+
+
void VirtualFrame::EmitPush(Handle<Object> value) {
ASSERT(stack_pointer_ == element_count() - 1);
elements_.Add(FrameElement::MemoryElement());
@@ -841,7 +849,7 @@ void VirtualFrame::SyncElementByPushing(int index) {
switch (element.type()) {
case FrameElement::INVALID:
- __ push(Immediate(Smi::FromInt(0)));
+ __ Push(Smi::FromInt(0));
break;
case FrameElement::MEMORY:
@@ -1005,7 +1013,7 @@ Result VirtualFrame::CallConstructor(int arg_count) {
function.ToRegister(rdi);
// Constructors are called with the number of arguments in register
- // eax for now. Another option would be to have separate construct
+ // rax for now. Another option would be to have separate construct
// call trampolines per different arguments counts encountered.
Result num_args = cgen()->allocator()->Allocate(rax);
ASSERT(num_args.is_valid());
« no previous file with comments | « src/x64/virtual-frame-x64.h ('k') | test/cctest/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698