| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 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 | 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/compiler/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 6 | 6 |
| 7 #include "src/contexts.h" | 7 #include "src/contexts.h" |
| 8 #include "src/frames.h" | 8 #include "src/frames.h" |
| 9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
| 10 #include "src/type-cache.h" | 10 #include "src/type-cache.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // static | 42 // static |
| 43 FieldAccess AccessBuilder::ForJSObjectElements() { | 43 FieldAccess AccessBuilder::ForJSObjectElements() { |
| 44 FieldAccess access = {kTaggedBase, JSObject::kElementsOffset, | 44 FieldAccess access = {kTaggedBase, JSObject::kElementsOffset, |
| 45 MaybeHandle<Name>(), Type::Internal(), kMachAnyTagged}; | 45 MaybeHandle<Name>(), Type::Internal(), kMachAnyTagged}; |
| 46 return access; | 46 return access; |
| 47 } | 47 } |
| 48 | 48 |
| 49 | 49 |
| 50 // static | 50 // static |
| 51 FieldAccess AccessBuilder::ForJSObjectInObjectProperty(Handle<Map> map, |
| 52 int index) { |
| 53 int const offset = map->GetInObjectPropertyOffset(index); |
| 54 FieldAccess access = {kTaggedBase, offset, MaybeHandle<Name>(), |
| 55 Type::Tagged(), kMachAnyTagged}; |
| 56 return access; |
| 57 } |
| 58 |
| 59 |
| 60 // static |
| 51 FieldAccess AccessBuilder::ForJSFunctionContext() { | 61 FieldAccess AccessBuilder::ForJSFunctionContext() { |
| 52 FieldAccess access = {kTaggedBase, JSFunction::kContextOffset, | 62 FieldAccess access = {kTaggedBase, JSFunction::kContextOffset, |
| 53 MaybeHandle<Name>(), Type::Internal(), kMachAnyTagged}; | 63 MaybeHandle<Name>(), Type::Internal(), kMachAnyTagged}; |
| 54 return access; | 64 return access; |
| 55 } | 65 } |
| 56 | 66 |
| 57 | 67 |
| 58 // static | 68 // static |
| 59 FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() { | 69 FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() { |
| 60 FieldAccess access = {kTaggedBase, JSFunction::kSharedFunctionInfoOffset, | 70 FieldAccess access = {kTaggedBase, JSFunction::kSharedFunctionInfoOffset, |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // static | 343 // static |
| 334 FieldAccess AccessBuilder::ForFrameMarker() { | 344 FieldAccess AccessBuilder::ForFrameMarker() { |
| 335 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, | 345 FieldAccess access = {kUntaggedBase, StandardFrameConstants::kMarkerOffset, |
| 336 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; | 346 MaybeHandle<Name>(), Type::Tagged(), kMachAnyTagged}; |
| 337 return access; | 347 return access; |
| 338 } | 348 } |
| 339 | 349 |
| 340 } // namespace compiler | 350 } // namespace compiler |
| 341 } // namespace internal | 351 } // namespace internal |
| 342 } // namespace v8 | 352 } // namespace v8 |
| OLD | NEW |