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

Side by Side Diff: src/compiler/code-stubs-turbofan.cc

Issue 925373002: Test StringLengthStub generation via TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/code-stubs.h"
6 #include "src/compiler/graph.h"
7 #include "src/compiler/linkage.h"
8 #include "src/compiler/pipeline.h"
9 #include "src/compiler/raw-machine-assembler.h"
10 #include "src/handles.h"
11
12 namespace v8 {
13 namespace internal {
14
15 Handle<Code> StringLengthStub::GenerateCode() {
16 using namespace v8::internal::compiler;
17 CompilationInfoWithZone info(this, isolate());
18 Graph graph(info.zone());
19 CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info);
20 RawMachineAssembler m(isolate(), &graph, descriptor->GetMachineSignature());
21
22 Node* str = m.Load(kMachAnyTagged, m.Parameter(0),
23 m.Int32Constant(JSValue::kValueOffset - kHeapObjectTag));
24 Node* len = m.Load(kMachAnyTagged, str,
25 m.Int32Constant(String::kLengthOffset - kHeapObjectTag));
26 m.Return(len);
27
28 return Pipeline::GenerateCodeForTesting(&info, &graph, m.Export());
titzer 2015/02/17 11:46:46 This method will need to be renamed to pass the pr
29 }
30
31 } // namespace internal
32 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698