Chromium Code Reviews| Index: src/runtime.cc |
| diff --git a/src/runtime.cc b/src/runtime.cc |
| index dcc76181fe488a0aa27a7c734cb7a5be706df303..fde8e9599a0bd080b6e318e78b33036ed9b0d291 100644 |
| --- a/src/runtime.cc |
| +++ b/src/runtime.cc |
| @@ -1,4 +1,4 @@ |
| -// Copyright 2012 the V8 project authors. All rights reserved. |
| +// Copyright 2012, 2013 the V8 project authors. All rights reserved. |
|
Michael Starzinger
2013/04/08 13:14:05
No need to update the copyright header of existing
|
| // Redistribution and use in source and binary forms, with or without |
| // modification, are permitted provided that the following conditions are |
| // met: |
| @@ -2385,6 +2385,17 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { |
| } |
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSGeneratorIterator) { |
| + HandleScope scope(isolate); |
| + ASSERT(args.length() == 1); |
| + CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
| + ASSERT(function->shared()->is_generator()); |
| + Handle<JSGeneratorIterator> generator = |
| + isolate->factory()->NewJSGeneratorIterator(function); |
|
Michael Starzinger
2013/04/08 13:14:05
If we call the Heap::AllocateJSGeneratorIterator d
|
| + return *generator; |
| +} |
| + |
| + |
| MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate, |
| Object* char_code) { |
| uint32_t code; |