Chromium Code Reviews| 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 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
| 6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
| 7 | 7 |
| 8 #include "isolate.h" | 8 #include "isolate.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 662 Handle<SharedFunctionInfo> info, | 662 Handle<SharedFunctionInfo> info, |
| 663 Handle<Context> context, | 663 Handle<Context> context, |
| 664 MaybeHandle<Object> maybe_prototype); | 664 MaybeHandle<Object> maybe_prototype); |
| 665 | 665 |
| 666 // Creates a function initialized with a shared part. | 666 // Creates a function initialized with a shared part. |
| 667 inline Handle<JSFunction> NewFunction(Handle<SharedFunctionInfo> info, | 667 inline Handle<JSFunction> NewFunction(Handle<SharedFunctionInfo> info, |
| 668 Handle<Context> context, | 668 Handle<Context> context, |
| 669 MaybeHandle<Object> maybe_prototype, | 669 MaybeHandle<Object> maybe_prototype, |
| 670 PretenureFlag pretenure = TENURED); | 670 PretenureFlag pretenure = TENURED); |
| 671 | 671 |
| 672 inline Handle<Code> NewCodeHelper(int object_size, bool immovable); | |
|
Michael Starzinger
2014/04/29 13:15:09
nit: Can we call this "NewCodeRaw", add a comment
Yang
2014/04/29 13:55:13
Done.
| |
| 673 | |
| 672 // Create a new map cache. | 674 // Create a new map cache. |
| 673 Handle<MapCache> NewMapCache(int at_least_space_for); | 675 Handle<MapCache> NewMapCache(int at_least_space_for); |
| 674 | 676 |
| 675 // Update the map cache in the native context with (keys, map) | 677 // Update the map cache in the native context with (keys, map) |
| 676 Handle<MapCache> AddToMapCache(Handle<Context> context, | 678 Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 677 Handle<FixedArray> keys, | 679 Handle<FixedArray> keys, |
| 678 Handle<Map> map); | 680 Handle<Map> map); |
| 679 | 681 |
| 680 // Attempt to find the number in a small cache. If we finds it, return | 682 // Attempt to find the number in a small cache. If we finds it, return |
| 681 // the string representation of the number. Otherwise return undefined. | 683 // the string representation of the number. Otherwise return undefined. |
| 682 Handle<Object> GetNumberStringCache(Handle<Object> number); | 684 Handle<Object> GetNumberStringCache(Handle<Object> number); |
| 683 | 685 |
| 684 // Update the cache with a new number-string pair. | 686 // Update the cache with a new number-string pair. |
| 685 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 687 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
| 686 }; | 688 }; |
| 687 | 689 |
| 688 } } // namespace v8::internal | 690 } } // namespace v8::internal |
| 689 | 691 |
| 690 #endif // V8_FACTORY_H_ | 692 #endif // V8_FACTORY_H_ |
| OLD | NEW |