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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 8387067: Remove one-line helper used in two places. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month 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/full-codegen-arm.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 26 matching lines...) Expand all
37 #include "parser.h" 37 #include "parser.h"
38 #include "scopes.h" 38 #include "scopes.h"
39 #include "stub-cache.h" 39 #include "stub-cache.h"
40 40
41 namespace v8 { 41 namespace v8 {
42 namespace internal { 42 namespace internal {
43 43
44 #define __ ACCESS_MASM(masm_) 44 #define __ ACCESS_MASM(masm_)
45 45
46 46
47 static unsigned GetPropertyId(Property* property) {
48 return property->id();
49 }
50
51
52 class JumpPatchSite BASE_EMBEDDED { 47 class JumpPatchSite BASE_EMBEDDED {
53 public: 48 public:
54 explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) { 49 explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) {
55 #ifdef DEBUG 50 #ifdef DEBUG
56 info_emitted_ = false; 51 info_emitted_ = false;
57 #endif 52 #endif
58 } 53 }
59 54
60 ~JumpPatchSite() { 55 ~JumpPatchSite() {
61 ASSERT(patch_site_.is_bound() == info_emitted_); 56 ASSERT(patch_site_.is_bound() == info_emitted_);
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 } 1668 }
1674 } 1669 }
1675 1670
1676 1671
1677 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 1672 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
1678 SetSourcePosition(prop->position()); 1673 SetSourcePosition(prop->position());
1679 Literal* key = prop->key()->AsLiteral(); 1674 Literal* key = prop->key()->AsLiteral();
1680 ASSERT(!key->handle()->IsSmi()); 1675 ASSERT(!key->handle()->IsSmi());
1681 __ mov(ecx, Immediate(key->handle())); 1676 __ mov(ecx, Immediate(key->handle()));
1682 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 1677 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
1683 __ call(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 1678 __ call(ic, RelocInfo::CODE_TARGET, prop->id());
1684 } 1679 }
1685 1680
1686 1681
1687 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { 1682 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
1688 SetSourcePosition(prop->position()); 1683 SetSourcePosition(prop->position());
1689 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 1684 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
1690 __ call(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 1685 __ call(ic, RelocInfo::CODE_TARGET, prop->id());
1691 } 1686 }
1692 1687
1693 1688
1694 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, 1689 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
1695 Token::Value op, 1690 Token::Value op,
1696 OverwriteMode mode, 1691 OverwriteMode mode,
1697 Expression* left, 1692 Expression* left,
1698 Expression* right) { 1693 Expression* right) {
1699 // Do combined smi check of the operands. Left operand is on the 1694 // Do combined smi check of the operands. Left operand is on the
1700 // stack. Right operand is in eax. 1695 // stack. Right operand is in eax.
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
4354 *context_length = 0; 4349 *context_length = 0;
4355 return previous_; 4350 return previous_;
4356 } 4351 }
4357 4352
4358 4353
4359 #undef __ 4354 #undef __
4360 4355
4361 } } // namespace v8::internal 4356 } } // namespace v8::internal
4362 4357
4363 #endif // V8_TARGET_ARCH_IA32 4358 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698