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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/ia32/full-codegen-ia32.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 29 matching lines...) Expand all
40 40
41 #include "arm/code-stubs-arm.h" 41 #include "arm/code-stubs-arm.h"
42 #include "arm/macro-assembler-arm.h" 42 #include "arm/macro-assembler-arm.h"
43 43
44 namespace v8 { 44 namespace v8 {
45 namespace internal { 45 namespace internal {
46 46
47 #define __ ACCESS_MASM(masm_) 47 #define __ ACCESS_MASM(masm_)
48 48
49 49
50 static unsigned GetPropertyId(Property* property) {
51 return property->id();
52 }
53
54
55 // A patch site is a location in the code which it is possible to patch. This 50 // A patch site is a location in the code which it is possible to patch. This
56 // class has a number of methods to emit the code which is patchable and the 51 // class has a number of methods to emit the code which is patchable and the
57 // method EmitPatchInfo to record a marker back to the patchable code. This 52 // method EmitPatchInfo to record a marker back to the patchable code. This
58 // marker is a cmp rx, #yyy instruction, and x * 0x00000fff + yyy (raw 12 bit 53 // marker is a cmp rx, #yyy instruction, and x * 0x00000fff + yyy (raw 12 bit
59 // immediate value is used) is the delta from the pc to the first instruction of 54 // immediate value is used) is the delta from the pc to the first instruction of
60 // the patchable code. 55 // the patchable code.
61 class JumpPatchSite BASE_EMBEDDED { 56 class JumpPatchSite BASE_EMBEDDED {
62 public: 57 public:
63 explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) { 58 explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) {
64 #ifdef DEBUG 59 #ifdef DEBUG
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 } 1722 }
1728 } 1723 }
1729 1724
1730 1725
1731 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 1726 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
1732 SetSourcePosition(prop->position()); 1727 SetSourcePosition(prop->position());
1733 Literal* key = prop->key()->AsLiteral(); 1728 Literal* key = prop->key()->AsLiteral();
1734 __ mov(r2, Operand(key->handle())); 1729 __ mov(r2, Operand(key->handle()));
1735 // Call load IC. It has arguments receiver and property name r0 and r2. 1730 // Call load IC. It has arguments receiver and property name r0 and r2.
1736 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 1731 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
1737 __ Call(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 1732 __ Call(ic, RelocInfo::CODE_TARGET, prop->id());
1738 } 1733 }
1739 1734
1740 1735
1741 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { 1736 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
1742 SetSourcePosition(prop->position()); 1737 SetSourcePosition(prop->position());
1743 // Call keyed load IC. It has arguments key and receiver in r0 and r1. 1738 // Call keyed load IC. It has arguments key and receiver in r0 and r1.
1744 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 1739 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
1745 __ Call(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 1740 __ Call(ic, RelocInfo::CODE_TARGET, prop->id());
1746 } 1741 }
1747 1742
1748 1743
1749 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, 1744 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
1750 Token::Value op, 1745 Token::Value op,
1751 OverwriteMode mode, 1746 OverwriteMode mode,
1752 Expression* left_expr, 1747 Expression* left_expr,
1753 Expression* right_expr) { 1748 Expression* right_expr) {
1754 Label done, smi_case, stub_call; 1749 Label done, smi_case, stub_call;
1755 1750
(...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after
4319 *context_length = 0; 4314 *context_length = 0;
4320 return previous_; 4315 return previous_;
4321 } 4316 }
4322 4317
4323 4318
4324 #undef __ 4319 #undef __
4325 4320
4326 } } // namespace v8::internal 4321 } } // namespace v8::internal
4327 4322
4328 #endif // V8_TARGET_ARCH_ARM 4323 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698