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

Side by Side Diff: src/x87/lithium-codegen-x87.cc

Issue 308793010: Inline Array.shift() fast path instead of using a code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "x87/lithium-codegen-x87.h" 9 #include "x87/lithium-codegen-x87.h"
10 #include "ic.h" 10 #include "ic.h"
(...skipping 4215 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; 4226 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
4227 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); 4227 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
4228 __ CallStub(&stub); 4228 __ CallStub(&stub);
4229 RecordSafepointWithLazyDeopt(instr, 4229 RecordSafepointWithLazyDeopt(instr,
4230 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 4230 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
4231 } 4231 }
4232 __ bind(&not_applicable); 4232 __ bind(&not_applicable);
4233 } 4233 }
4234 4234
4235 4235
4236 void LCodeGen::DoArrayShift(LArrayShift* instr) {
4237 ASSERT(ToRegister(instr->context()).is(esi));
4238 ASSERT(ToRegister(instr->object()).is(eax));
4239 ASSERT(ToRegister(instr->result()).is(eax));
4240 ArrayShiftStub stub(isolate(), instr->hydrogen()->kind());
4241 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4242 }
4243
4244
4245 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4236 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4246 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { 4237 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
4247 public: 4238 public:
4248 DeferredStringCharCodeAt(LCodeGen* codegen, 4239 DeferredStringCharCodeAt(LCodeGen* codegen,
4249 LStringCharCodeAt* instr, 4240 LStringCharCodeAt* instr,
4250 const X87Stack& x87_stack) 4241 const X87Stack& x87_stack)
4251 : LDeferredCode(codegen, x87_stack), instr_(instr) { } 4242 : LDeferredCode(codegen, x87_stack), instr_(instr) { }
4252 virtual void Generate() V8_OVERRIDE { 4243 virtual void Generate() V8_OVERRIDE {
4253 codegen()->DoDeferredStringCharCodeAt(instr_); 4244 codegen()->DoDeferredStringCharCodeAt(instr_);
4254 } 4245 }
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
5691 __ bind(deferred->exit()); 5682 __ bind(deferred->exit());
5692 __ bind(&done); 5683 __ bind(&done);
5693 } 5684 }
5694 5685
5695 5686
5696 #undef __ 5687 #undef __
5697 5688
5698 } } // namespace v8::internal 5689 } } // namespace v8::internal
5699 5690
5700 #endif // V8_TARGET_ARCH_X87 5691 #endif // V8_TARGET_ARCH_X87
OLDNEW
« src/hydrogen.cc ('K') | « src/x87/code-stubs-x87.cc ('k') | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698