| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 void FlattenString(Handle<String> string) { | 240 void FlattenString(Handle<String> string) { |
| 241 CALL_HEAP_FUNCTION_VOID(string->GetIsolate(), string->TryFlatten()); | 241 CALL_HEAP_FUNCTION_VOID(string->GetIsolate(), string->TryFlatten()); |
| 242 } | 242 } |
| 243 | 243 |
| 244 | 244 |
| 245 Handle<String> FlattenGetString(Handle<String> string) { | 245 Handle<String> FlattenGetString(Handle<String> string) { |
| 246 CALL_HEAP_FUNCTION(string->GetIsolate(), string->TryFlatten(), String); | 246 CALL_HEAP_FUNCTION(string->GetIsolate(), string->TryFlatten(), String); |
| 247 } | 247 } |
| 248 | 248 |
| 249 | 249 |
| 250 uint16_t StringGetMayFlatten(Handle<String> string, int index) { |
| 251 CALL_AND_RETRY(string->GetIsolate(), |
| 252 string->GetMayFlatten(index), |
| 253 return static_cast<uint16_t>(Smi::cast(__object__)->value()), |
| 254 return 0u); |
| 255 } |
| 256 |
| 257 |
| 250 Handle<Object> SetPrototype(Handle<JSFunction> function, | 258 Handle<Object> SetPrototype(Handle<JSFunction> function, |
| 251 Handle<Object> prototype) { | 259 Handle<Object> prototype) { |
| 252 ASSERT(function->should_have_prototype()); | 260 ASSERT(function->should_have_prototype()); |
| 253 CALL_HEAP_FUNCTION(function->GetIsolate(), | 261 CALL_HEAP_FUNCTION(function->GetIsolate(), |
| 254 Accessors::FunctionSetPrototype(*function, | 262 Accessors::FunctionSetPrototype(*function, |
| 255 *prototype, | 263 *prototype, |
| 256 NULL), | 264 NULL), |
| 257 Object); | 265 Object); |
| 258 } | 266 } |
| 259 | 267 |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 | 975 |
| 968 bool CompileOptimized(Handle<JSFunction> function, | 976 bool CompileOptimized(Handle<JSFunction> function, |
| 969 int osr_ast_id, | 977 int osr_ast_id, |
| 970 ClearExceptionFlag flag) { | 978 ClearExceptionFlag flag) { |
| 971 CompilationInfo info(function); | 979 CompilationInfo info(function); |
| 972 info.SetOptimizing(osr_ast_id); | 980 info.SetOptimizing(osr_ast_id); |
| 973 return CompileLazyHelper(&info, flag); | 981 return CompileLazyHelper(&info, flag); |
| 974 } | 982 } |
| 975 | 983 |
| 976 } } // namespace v8::internal | 984 } } // namespace v8::internal |
| OLD | NEW |