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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2402363002: [Math] implement Math.random as TFJ builtin. (Closed)
Patch Set: fix golden file Created 4 years, 2 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/code-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/ic/handler-configuration.h" 9 #include "src/ic/handler-configuration.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 return nullptr; 1085 return nullptr;
1086 } 1086 }
1087 return Load(machine_type, base, offset); 1087 return Load(machine_type, base, offset);
1088 } 1088 }
1089 1089
1090 Node* CodeStubAssembler::LoadContextElement(Node* context, int slot_index) { 1090 Node* CodeStubAssembler::LoadContextElement(Node* context, int slot_index) {
1091 int offset = Context::SlotOffset(slot_index); 1091 int offset = Context::SlotOffset(slot_index);
1092 return Load(MachineType::AnyTagged(), context, IntPtrConstant(offset)); 1092 return Load(MachineType::AnyTagged(), context, IntPtrConstant(offset));
1093 } 1093 }
1094 1094
1095 Node* CodeStubAssembler::StoreContextElement(Node* context, int slot_index,
1096 Node* value) {
1097 int offset = Context::SlotOffset(slot_index);
1098 return Store(MachineRepresentation::kTagged, context, IntPtrConstant(offset),
1099 value);
1100 }
1101
1095 Node* CodeStubAssembler::LoadNativeContext(Node* context) { 1102 Node* CodeStubAssembler::LoadNativeContext(Node* context) {
1096 return LoadContextElement(context, Context::NATIVE_CONTEXT_INDEX); 1103 return LoadContextElement(context, Context::NATIVE_CONTEXT_INDEX);
1097 } 1104 }
1098 1105
1099 Node* CodeStubAssembler::LoadJSArrayElementsMap(ElementsKind kind, 1106 Node* CodeStubAssembler::LoadJSArrayElementsMap(ElementsKind kind,
1100 Node* native_context) { 1107 Node* native_context) {
1101 return LoadFixedArrayElement(native_context, 1108 return LoadFixedArrayElement(native_context,
1102 IntPtrConstant(Context::ArrayMapIndex(kind))); 1109 IntPtrConstant(Context::ArrayMapIndex(kind)));
1103 } 1110 }
1104 1111
(...skipping 6113 matching lines...) Expand 10 before | Expand all | Expand 10 after
7218 result.Bind(CallRuntime(Runtime::kInstanceOf, context, object, callable)); 7225 result.Bind(CallRuntime(Runtime::kInstanceOf, context, object, callable));
7219 Goto(&end); 7226 Goto(&end);
7220 } 7227 }
7221 7228
7222 Bind(&end); 7229 Bind(&end);
7223 return result.value(); 7230 return result.value();
7224 } 7231 }
7225 7232
7226 } // namespace internal 7233 } // namespace internal
7227 } // namespace v8 7234 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/contexts.h » ('j') | test/mjsunit/debug-script.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698