Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/runtime/runtime-generator.cc

Issue 1906823002: Move of the type feedback vector to the closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } else { 70 } else {
71 Handle<FixedArray> operand_stack = 71 Handle<FixedArray> operand_stack =
72 isolate->factory()->NewFixedArray(operands_count); 72 isolate->factory()->NewFixedArray(operands_count);
73 frame->SaveOperandStack(*operand_stack); 73 frame->SaveOperandStack(*operand_stack);
74 generator_object->set_operand_stack(*operand_stack); 74 generator_object->set_operand_stack(*operand_stack);
75 } 75 }
76 76
77 return isolate->heap()->undefined_value(); 77 return isolate->heap()->undefined_value();
78 } 78 }
79 79
80
81 RUNTIME_FUNCTION(Runtime_GeneratorClose) { 80 RUNTIME_FUNCTION(Runtime_GeneratorClose) {
82 HandleScope scope(isolate); 81 HandleScope scope(isolate);
83 DCHECK(args.length() == 1); 82 DCHECK(args.length() == 1);
84 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); 83 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
85 84
86 generator->set_continuation(JSGeneratorObject::kGeneratorClosed); 85 generator->set_continuation(JSGeneratorObject::kGeneratorClosed);
87 86
88 return isolate->heap()->undefined_value(); 87 return isolate->heap()->undefined_value();
89 } 88 }
90 89
(...skipping 20 matching lines...) Expand all
111 110
112 // Returns input of generator activation. 111 // Returns input of generator activation.
113 RUNTIME_FUNCTION(Runtime_GeneratorGetInput) { 112 RUNTIME_FUNCTION(Runtime_GeneratorGetInput) {
114 HandleScope scope(isolate); 113 HandleScope scope(isolate);
115 DCHECK(args.length() == 1); 114 DCHECK(args.length() == 1);
116 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); 115 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
117 116
118 return generator->input(); 117 return generator->input();
119 } 118 }
120 119
121
122 // Returns resume mode of generator activation. 120 // Returns resume mode of generator activation.
123 RUNTIME_FUNCTION(Runtime_GeneratorGetResumeMode) { 121 RUNTIME_FUNCTION(Runtime_GeneratorGetResumeMode) {
124 HandleScope scope(isolate); 122 HandleScope scope(isolate);
125 DCHECK(args.length() == 1); 123 DCHECK(args.length() == 1);
126 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); 124 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
127 125
128 return Smi::FromInt(generator->resume_mode()); 126 return Smi::FromInt(generator->resume_mode());
129 } 127 }
130 128
131 129
(...skipping 16 matching lines...) Expand all
148 int offset = generator->continuation(); 146 int offset = generator->continuation();
149 RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size()); 147 RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size());
150 return Smi::FromInt(code->SourcePosition(offset)); 148 return Smi::FromInt(code->SourcePosition(offset));
151 } 149 }
152 150
153 return isolate->heap()->undefined_value(); 151 return isolate->heap()->undefined_value();
154 } 152 }
155 153
156 } // namespace internal 154 } // namespace internal
157 } // namespace v8 155 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698