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

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

Issue 28065: Experimental: port the JS function check at function entry from ARM to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 10 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/virtual-frame-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 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 Use(target.reg()); 382 Use(target.reg());
383 elements_[i] = target; 383 elements_[i] = target;
384 } 384 }
385 } 385 }
386 } 386 }
387 387
388 388
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
393 #ifdef DEBUG
394 // Verify that edi contains a JS function. The following code
395 // relies on eax being available for use.
396 __ test(edi, Immediate(kSmiTagMask));
397 __ Check(not_zero,
398 "VirtualFrame::Enter - edi is not a function (smi check).");
399 __ mov(eax, FieldOperand(edi, HeapObject::kMapOffset));
400 __ movzx_b(eax, FieldOperand(eax, Map::kInstanceTypeOffset));
401 __ cmp(eax, JS_FUNCTION_TYPE);
402 __ Check(equal,
403 "VirtualFrame::Enter - edi is not a function (map check).");
404 #endif
405
392 EmitPush(ebp); 406 EmitPush(ebp);
393 407
394 frame_pointer_ = stack_pointer_; 408 frame_pointer_ = stack_pointer_;
395 __ mov(ebp, Operand(esp)); 409 __ mov(ebp, Operand(esp));
396 410
397 // Store the context in the frame. The context is kept in esi and a 411 // Store the context in the frame. The context is kept in esi and a
398 // copy is stored in the frame. The external reference to esi 412 // copy is stored in the frame. The external reference to esi
399 // remains. 413 // remains.
400 EmitPush(esi); 414 EmitPush(esi);
401 415
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 ASSERT(stack_pointer_ == elements_.length() - 1); 982 ASSERT(stack_pointer_ == elements_.length() - 1);
969 elements_.Add(FrameElement::MemoryElement()); 983 elements_.Add(FrameElement::MemoryElement());
970 stack_pointer_++; 984 stack_pointer_++;
971 __ push(immediate); 985 __ push(immediate);
972 } 986 }
973 987
974 988
975 #undef __ 989 #undef __
976 990
977 } } // namespace v8::internal 991 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/virtual-frame-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698