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

Side by Side Diff: src/builtins.cc

Issue 1617503003: [Atomics] code stubs for atomic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove FCG+CS intrinsic wiring, experiments with CodeStubAssembler Created 4 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
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 "src/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
11 #include "src/bootstrapper.h" 11 #include "src/bootstrapper.h"
12 #include "src/compiler/code-stub-assembler.h"
12 #include "src/dateparser-inl.h" 13 #include "src/dateparser-inl.h"
13 #include "src/elements.h" 14 #include "src/elements.h"
14 #include "src/frames-inl.h" 15 #include "src/frames-inl.h"
15 #include "src/gdb-jit.h" 16 #include "src/gdb-jit.h"
16 #include "src/ic/handler-compiler.h" 17 #include "src/ic/handler-compiler.h"
17 #include "src/ic/ic.h" 18 #include "src/ic/ic.h"
18 #include "src/isolate-inl.h" 19 #include "src/isolate-inl.h"
19 #include "src/messages.h" 20 #include "src/messages.h"
20 #include "src/profiler/cpu-profiler.h" 21 #include "src/profiler/cpu-profiler.h"
21 #include "src/property-descriptor.h" 22 #include "src/property-descriptor.h"
(...skipping 4141 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) { 4164 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) {
4164 masm->TailCallRuntime(Runtime::kInterrupt); 4165 masm->TailCallRuntime(Runtime::kInterrupt);
4165 } 4166 }
4166 4167
4167 4168
4168 void Builtins::Generate_StackCheck(MacroAssembler* masm) { 4169 void Builtins::Generate_StackCheck(MacroAssembler* masm) {
4169 masm->TailCallRuntime(Runtime::kStackGuard); 4170 masm->TailCallRuntime(Runtime::kStackGuard);
4170 } 4171 }
4171 4172
4172 4173
4174 void Builtins::Generate_AtomicsLoadCheck(MacroAssembler* masm) {
4175 using namespace compiler;
4176 Isolate* isolate = masm->isolate();
4177 Zone zone;
4178 BuiltinDescriptor descriptor(isolate);
4179 CodeStubAssembler assembler(isolate, &zone, descriptor, Code::STUB,
Jarin 2016/02/03 09:04:07 Code::Stub ==> Code::ComputeFlags(Code::STUB)
binji 2016/02/03 22:09:02 Oops. Would have been nice if the compiler caught
4180 "AtomicsLoadCheck");
4181
4182 assembler.Return(assembler.StackArgOrUndefined(assembler.Parameter(0), 1));
4183
4184 masm->Jump(assembler.GenerateCode(), RelocInfo::CODE_TARGET);
4185 }
4186
4187
4173 #define DEFINE_BUILTIN_ACCESSOR_C(name, ignore) \ 4188 #define DEFINE_BUILTIN_ACCESSOR_C(name, ignore) \
4174 Handle<Code> Builtins::name() { \ 4189 Handle<Code> Builtins::name() { \
4175 Code** code_address = \ 4190 Code** code_address = \
4176 reinterpret_cast<Code**>(builtin_address(k##name)); \ 4191 reinterpret_cast<Code**>(builtin_address(k##name)); \
4177 return Handle<Code>(code_address); \ 4192 return Handle<Code>(code_address); \
4178 } 4193 }
4179 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \ 4194 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \
4180 Handle<Code> Builtins::name() { \ 4195 Handle<Code> Builtins::name() { \
4181 Code** code_address = \ 4196 Code** code_address = \
4182 reinterpret_cast<Code**>(builtin_address(k##name)); \ 4197 reinterpret_cast<Code**>(builtin_address(k##name)); \
4183 return Handle<Code>(code_address); \ 4198 return Handle<Code>(code_address); \
4184 } 4199 }
4185 #define DEFINE_BUILTIN_ACCESSOR_H(name, kind) \ 4200 #define DEFINE_BUILTIN_ACCESSOR_H(name, kind) \
4186 Handle<Code> Builtins::name() { \ 4201 Handle<Code> Builtins::name() { \
4187 Code** code_address = \ 4202 Code** code_address = \
4188 reinterpret_cast<Code**>(builtin_address(k##name)); \ 4203 reinterpret_cast<Code**>(builtin_address(k##name)); \
4189 return Handle<Code>(code_address); \ 4204 return Handle<Code>(code_address); \
4190 } 4205 }
4191 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 4206 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
4192 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 4207 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
4193 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 4208 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
4194 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 4209 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
4195 #undef DEFINE_BUILTIN_ACCESSOR_C 4210 #undef DEFINE_BUILTIN_ACCESSOR_C
4196 #undef DEFINE_BUILTIN_ACCESSOR_A 4211 #undef DEFINE_BUILTIN_ACCESSOR_A
4197 4212
4198 4213
4199 } // namespace internal 4214 } // namespace internal
4200 } // namespace v8 4215 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698