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

Side by Side Diff: src/virtual-frame-ia32.cc

Issue 39336: Refactored the code for comparing the type of an object with a constant.... Base URL: http://v8.googlecode.com/svn/branches/experimental/global/
Patch Set: Created 11 years, 9 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
« src/builtins-ia32.cc ('K') | « src/stub-cache-ia32.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 void VirtualFrame::Enter() { 389 void VirtualFrame::Enter() {
390 // Registers live on entry: esp, ebp, esi, edi. 390 // Registers live on entry: esp, ebp, esi, edi.
391 Comment cmnt(masm_, "[ Enter JS frame"); 391 Comment cmnt(masm_, "[ Enter JS frame");
392 392
393 #ifdef DEBUG 393 #ifdef DEBUG
394 // Verify that edi contains a JS function. The following code 394 // Verify that edi contains a JS function. The following code
395 // relies on eax being available for use. 395 // relies on eax being available for use.
396 __ test(edi, Immediate(kSmiTagMask)); 396 __ test(edi, Immediate(kSmiTagMask));
397 __ Check(not_zero, 397 __ Check(not_zero,
398 "VirtualFrame::Enter - edi is not a function (smi check)."); 398 "VirtualFrame::Enter - edi is not a function (smi check).");
399 __ mov(eax, FieldOperand(edi, HeapObject::kMapOffset)); 399 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax);
400 __ movzx_b(eax, FieldOperand(eax, Map::kInstanceTypeOffset));
401 __ cmp(eax, JS_FUNCTION_TYPE);
402 __ Check(equal, 400 __ Check(equal,
403 "VirtualFrame::Enter - edi is not a function (map check)."); 401 "VirtualFrame::Enter - edi is not a function (map check).");
404 #endif 402 #endif
405 403
406 EmitPush(ebp); 404 EmitPush(ebp);
407 405
408 frame_pointer_ = stack_pointer_; 406 frame_pointer_ = stack_pointer_;
409 __ mov(ebp, Operand(esp)); 407 __ mov(ebp, Operand(esp));
410 408
411 // Store the context in the frame. The context is kept in esi and a 409 // Store the context in the frame. The context is kept in esi and a
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 ASSERT(stack_pointer_ == elements_.length() - 1); 980 ASSERT(stack_pointer_ == elements_.length() - 1);
983 elements_.Add(FrameElement::MemoryElement()); 981 elements_.Add(FrameElement::MemoryElement());
984 stack_pointer_++; 982 stack_pointer_++;
985 __ push(immediate); 983 __ push(immediate);
986 } 984 }
987 985
988 986
989 #undef __ 987 #undef __
990 988
991 } } // namespace v8::internal 989 } } // namespace v8::internal
OLDNEW
« src/builtins-ia32.cc ('K') | « src/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698