| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/runtime/runtime.h" | 10 #include "src/runtime/runtime.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 StringCharacterStream stream(string, &op); | 240 StringCharacterStream stream(string, &op); |
| 241 while (stream.HasMore()) { | 241 while (stream.HasMore()) { |
| 242 uint16_t character = stream.GetNext(); | 242 uint16_t character = stream.GetNext(); |
| 243 PrintF("%c", character); | 243 PrintF("%c", character); |
| 244 } | 244 } |
| 245 return string; | 245 return string; |
| 246 } | 246 } |
| 247 | 247 |
| 248 | 248 |
| 249 RUNTIME_FUNCTION(Runtime_SystemBreak) { | 249 RUNTIME_FUNCTION(Runtime_SystemBreak) { |
| 250 SealHandleScope shs(isolate); | 250 // The code below doesn't create handles, but when breaking here in GDB |
| 251 // having a handle scope might be useful. |
| 252 HandleScope scope(isolate); |
| 251 DCHECK(args.length() == 0); | 253 DCHECK(args.length() == 0); |
| 252 base::OS::DebugBreak(); | 254 base::OS::DebugBreak(); |
| 253 return isolate->heap()->undefined_value(); | 255 return isolate->heap()->undefined_value(); |
| 254 } | 256 } |
| 255 | 257 |
| 256 | 258 |
| 257 // Sets a v8 flag. | 259 // Sets a v8 flag. |
| 258 RUNTIME_FUNCTION(Runtime_SetFlags) { | 260 RUNTIME_FUNCTION(Runtime_SetFlags) { |
| 259 SealHandleScope shs(isolate); | 261 SealHandleScope shs(isolate); |
| 260 DCHECK(args.length() == 1); | 262 DCHECK(args.length() == 1); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 440 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
| 439 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 441 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
| 440 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 442 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
| 441 } | 443 } |
| 442 | 444 |
| 443 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 445 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
| 444 | 446 |
| 445 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 447 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
| 446 } | 448 } |
| 447 } // namespace v8::internal | 449 } // namespace v8::internal |
| OLD | NEW |