| OLD | NEW |
| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 static Code::Flags CommonStubCacheChecks(Name* name, Map* map, | 36 static Code::Flags CommonStubCacheChecks(Name* name, Map* map, |
| 37 Code::Flags flags, Heap* heap) { | 37 Code::Flags flags, Heap* heap) { |
| 38 flags = Code::RemoveTypeAndHolderFromFlags(flags); | 38 flags = Code::RemoveTypeAndHolderFromFlags(flags); |
| 39 | 39 |
| 40 // Validate that the name does not move on scavenge, and that we | 40 // Validate that the name does not move on scavenge, and that we |
| 41 // can use identity checks instead of structural equality checks. | 41 // can use identity checks instead of structural equality checks. |
| 42 ASSERT(!heap->InNewSpace(name)); | 42 ASSERT(!heap->InNewSpace(name)); |
| 43 ASSERT(name->IsUniqueName()); | 43 ASSERT(name->IsUniqueName()); |
| 44 | 44 |
| 45 // The state bits are not important to the hash function because | 45 // The state bits are not important to the hash function because the stub |
| 46 // the stub cache only contains monomorphic stubs. Make sure that | 46 // cache only contains handlers. Make sure that the bits are the least |
| 47 // the bits are the least significant so they will be the ones | 47 // significant so they will be the ones masked out. |
| 48 // masked out. | 48 ASSERT_EQ(Code::HANDLER, Code::ExtractKindFromFlags(flags)); |
| 49 ASSERT(Code::ExtractICStateFromFlags(flags) == MONOMORPHIC); | |
| 50 STATIC_ASSERT((Code::ICStateField::kMask & 1) == 1); | 49 STATIC_ASSERT((Code::ICStateField::kMask & 1) == 1); |
| 51 | 50 |
| 52 // Make sure that the code type and cache holder are not included in the hash. | 51 // Make sure that the code type and cache holder are not included in the hash. |
| 53 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); | 52 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); |
| 54 ASSERT(Code::ExtractCacheHolderFromFlags(flags) == 0); | 53 ASSERT(Code::ExtractCacheHolderFromFlags(flags) == 0); |
| 55 | 54 |
| 56 return flags; | 55 return flags; |
| 57 } | 56 } |
| 58 | 57 |
| 59 | 58 |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 Handle<FunctionTemplateInfo>( | 1430 Handle<FunctionTemplateInfo>( |
| 1432 FunctionTemplateInfo::cast(signature->receiver())); | 1431 FunctionTemplateInfo::cast(signature->receiver())); |
| 1433 } | 1432 } |
| 1434 } | 1433 } |
| 1435 | 1434 |
| 1436 is_simple_api_call_ = true; | 1435 is_simple_api_call_ = true; |
| 1437 } | 1436 } |
| 1438 | 1437 |
| 1439 | 1438 |
| 1440 } } // namespace v8::internal | 1439 } } // namespace v8::internal |
| OLD | NEW |