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

Side by Side Diff: src/ic/access-compiler.cc

Issue 480413008: Move PropertyAccessCompiler and CallOptimization to their own files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/ic/access-compiler.h ('k') | src/ic/arm/access-compiler-arm.cc » ('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 2014 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/v8.h"
6
7 #include "src/ic/access-compiler.h"
8
9
10 namespace v8 {
11 namespace internal {
12
13
14 Handle<Code> PropertyAccessCompiler::GetCodeWithFlags(Code::Flags flags,
15 const char* name) {
16 // Create code object in the heap.
17 CodeDesc desc;
18 masm()->GetCode(&desc);
19 Handle<Code> code = factory()->NewCode(desc, flags, masm()->CodeObject());
20 if (code->IsCodeStubOrIC()) code->set_stub_key(CodeStub::NoCacheKey());
21 #ifdef ENABLE_DISASSEMBLER
22 if (FLAG_print_code_stubs) {
23 OFStream os(stdout);
24 code->Disassemble(name, os);
25 }
26 #endif
27 return code;
28 }
29
30
31 Handle<Code> PropertyAccessCompiler::GetCodeWithFlags(Code::Flags flags,
32 Handle<Name> name) {
33 return (FLAG_print_code_stubs && !name.is_null() && name->IsString())
34 ? GetCodeWithFlags(flags,
35 Handle<String>::cast(name)->ToCString().get())
36 : GetCodeWithFlags(flags, NULL);
37 }
38
39
40 void PropertyAccessCompiler::TailCallBuiltin(MacroAssembler* masm,
41 Builtins::Name name) {
42 Handle<Code> code(masm->isolate()->builtins()->builtin(name));
43 GenerateTailCall(masm, code);
44 }
45
46
47 Register* PropertyAccessCompiler::GetCallingConvention(Code::Kind kind) {
48 if (kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC) {
49 return load_calling_convention();
50 }
51 DCHECK(kind == Code::STORE_IC || kind == Code::KEYED_STORE_IC);
52 return store_calling_convention();
53 }
54 }
55 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/access-compiler.h ('k') | src/ic/arm/access-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698