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

Side by Side Diff: src/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 #include "mips/code-stubs-mips.h" 49 #include "mips/code-stubs-mips.h"
50 #include "mips/macro-assembler-mips.h" 50 #include "mips/macro-assembler-mips.h"
51 51
52 namespace v8 { 52 namespace v8 {
53 namespace internal { 53 namespace internal {
54 54
55 #define __ ACCESS_MASM(masm_) 55 #define __ ACCESS_MASM(masm_)
56 56
57 57
58 static unsigned GetPropertyId(Property* property) {
59 return property->id();
60 }
61
62
63 // A patch site is a location in the code which it is possible to patch. This 58 // A patch site is a location in the code which it is possible to patch. This
64 // class has a number of methods to emit the code which is patchable and the 59 // class has a number of methods to emit the code which is patchable and the
65 // method EmitPatchInfo to record a marker back to the patchable code. This 60 // method EmitPatchInfo to record a marker back to the patchable code. This
66 // marker is a andi zero_reg, rx, #yyyy instruction, and rx * 0x0000ffff + yyyy 61 // marker is a andi zero_reg, rx, #yyyy instruction, and rx * 0x0000ffff + yyyy
67 // (raw 16 bit immediate value is used) is the delta from the pc to the first 62 // (raw 16 bit immediate value is used) is the delta from the pc to the first
68 // instruction of the patchable code. 63 // instruction of the patchable code.
69 // The marker instruction is effectively a NOP (dest is zero_reg) and will 64 // The marker instruction is effectively a NOP (dest is zero_reg) and will
70 // never be emitted by normal code. 65 // never be emitted by normal code.
71 class JumpPatchSite BASE_EMBEDDED { 66 class JumpPatchSite BASE_EMBEDDED {
72 public: 67 public:
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 } 1736 }
1742 1737
1743 1738
1744 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 1739 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
1745 SetSourcePosition(prop->position()); 1740 SetSourcePosition(prop->position());
1746 Literal* key = prop->key()->AsLiteral(); 1741 Literal* key = prop->key()->AsLiteral();
1747 __ mov(a0, result_register()); 1742 __ mov(a0, result_register());
1748 __ li(a2, Operand(key->handle())); 1743 __ li(a2, Operand(key->handle()));
1749 // Call load IC. It has arguments receiver and property name a0 and a2. 1744 // Call load IC. It has arguments receiver and property name a0 and a2.
1750 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 1745 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
1751 __ Call(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 1746 __ Call(ic, RelocInfo::CODE_TARGET, prop->id());
1752 } 1747 }
1753 1748
1754 1749
1755 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { 1750 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
1756 SetSourcePosition(prop->position()); 1751 SetSourcePosition(prop->position());
1757 __ mov(a0, result_register()); 1752 __ mov(a0, result_register());
1758 // Call keyed load IC. It has arguments key and receiver in a0 and a1. 1753 // Call keyed load IC. It has arguments key and receiver in a0 and a1.
1759 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 1754 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
1760 __ Call(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 1755 __ Call(ic, RelocInfo::CODE_TARGET, prop->id());
1761 } 1756 }
1762 1757
1763 1758
1764 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, 1759 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
1765 Token::Value op, 1760 Token::Value op,
1766 OverwriteMode mode, 1761 OverwriteMode mode,
1767 Expression* left_expr, 1762 Expression* left_expr,
1768 Expression* right_expr) { 1763 Expression* right_expr) {
1769 Label done, smi_case, stub_call; 1764 Label done, smi_case, stub_call;
1770 1765
(...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after
4348 *context_length = 0; 4343 *context_length = 0;
4349 return previous_; 4344 return previous_;
4350 } 4345 }
4351 4346
4352 4347
4353 #undef __ 4348 #undef __
4354 4349
4355 } } // namespace v8::internal 4350 } } // namespace v8::internal
4356 4351
4357 #endif // V8_TARGET_ARCH_MIPS 4352 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698