| 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 "factory.h" | 5 #include "factory.h" |
| 6 | 6 |
| 7 #include "macro-assembler.h" | 7 #include "macro-assembler.h" |
| 8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
| 9 #include "v8conversions.h" | 9 #include "v8conversions.h" |
| 10 | 10 |
| (...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 // We tenure the allocated string since it is referenced from the | 1954 // We tenure the allocated string since it is referenced from the |
| 1955 // number-string cache which lives in the old space. | 1955 // number-string cache which lives in the old space. |
| 1956 Handle<String> js_string = NewStringFromAsciiChecked(str, TENURED); | 1956 Handle<String> js_string = NewStringFromAsciiChecked(str, TENURED); |
| 1957 SetNumberStringCache(number, js_string); | 1957 SetNumberStringCache(number, js_string); |
| 1958 return js_string; | 1958 return js_string; |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 | 1961 |
| 1962 Handle<SeededNumberDictionary> Factory::DictionaryAtNumberPut( | |
| 1963 Handle<SeededNumberDictionary> dictionary, | |
| 1964 uint32_t key, | |
| 1965 Handle<Object> value) { | |
| 1966 CALL_HEAP_FUNCTION(isolate(), | |
| 1967 dictionary->AtNumberPut(key, *value), | |
| 1968 SeededNumberDictionary); | |
| 1969 } | |
| 1970 | |
| 1971 | |
| 1972 Handle<UnseededNumberDictionary> Factory::DictionaryAtNumberPut( | |
| 1973 Handle<UnseededNumberDictionary> dictionary, | |
| 1974 uint32_t key, | |
| 1975 Handle<Object> value) { | |
| 1976 CALL_HEAP_FUNCTION(isolate(), | |
| 1977 dictionary->AtNumberPut(key, *value), | |
| 1978 UnseededNumberDictionary); | |
| 1979 } | |
| 1980 | |
| 1981 | |
| 1982 void Factory::InitializeFunction(Handle<JSFunction> function, | 1962 void Factory::InitializeFunction(Handle<JSFunction> function, |
| 1983 Handle<SharedFunctionInfo> info, | 1963 Handle<SharedFunctionInfo> info, |
| 1984 Handle<Context> context, | 1964 Handle<Context> context, |
| 1985 MaybeHandle<Object> maybe_prototype) { | 1965 MaybeHandle<Object> maybe_prototype) { |
| 1986 function->initialize_properties(); | 1966 function->initialize_properties(); |
| 1987 function->initialize_elements(); | 1967 function->initialize_elements(); |
| 1988 function->set_shared(*info); | 1968 function->set_shared(*info); |
| 1989 function->set_code(info->code()); | 1969 function->set_code(info->code()); |
| 1990 function->set_context(*context); | 1970 function->set_context(*context); |
| 1991 Handle<Object> prototype; | 1971 Handle<Object> prototype; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2341 return Handle<Object>::null(); | 2321 return Handle<Object>::null(); |
| 2342 } | 2322 } |
| 2343 | 2323 |
| 2344 | 2324 |
| 2345 Handle<Object> Factory::ToBoolean(bool value) { | 2325 Handle<Object> Factory::ToBoolean(bool value) { |
| 2346 return value ? true_value() : false_value(); | 2326 return value ? true_value() : false_value(); |
| 2347 } | 2327 } |
| 2348 | 2328 |
| 2349 | 2329 |
| 2350 } } // namespace v8::internal | 2330 } } // namespace v8::internal |
| OLD | NEW |