Lines Matching refs:Code
6 // * Redistributions of source code must retain the above copyright
2065 // case of eval code, the context passed is the context of the caller,
2551 Handle<Code> code(isolate->builtins()->builtin(builtin_name));
2556 code,
2750 CONVERT_ARG_CHECKED(Code, code, 0);
2753 RUNTIME_ASSERT(0 <= offset && offset < code->Size());
2755 Address pc = code->address() + offset;
2756 return Smi::FromInt(code->SourcePosition(pc));
2862 Handle<Object> code = args.at<Object>(1);
2864 if (code->IsNull()) return *target;
2865 RUNTIME_ASSERT(code->IsJSFunction());
2866 Handle<JSFunction> source = Handle<JSFunction>::cast(code);
2875 // shared unoptimized code makes them impossible to enqueue in a list.
2876 ASSERT(target_shared->code()->gc_metadata() == NULL);
2877 ASSERT(source_shared->code()->gc_metadata() == NULL);
2881 // Set the code, scope info, formal parameter count, and the length
2882 // of the target shared function info. Set the source code of the
2884 // constructors like String, Array, and Object, and some web code
2885 // doesn't like seeing source code for constructors.
2886 target_shared->ReplaceCode(source_shared->code());
2894 target_shared->code()->set_optimizable(false);
2896 // Set the code of the target function.
2897 target->ReplaceCode(source_shared->code());
2916 source_shared, Handle<Code>(source_shared->code()));
3028 Address pc = generator_object->function()->code()->instruction_start();
4994 // change, this should be fixed once we cleanup the underlying code.
7361 // smallest because the char code of '-' is less than the char code
7940 // into C++ code. Collect these in a newly allocated array of handles (possibly
7997 // TODO(lrn): Create bound function in C++ code from premade shared info.
8129 // case generated code bailouts here, since function has no initial_map.
8215 // All done. Return the compiled code.
8217 return function->code();
8228 // code from the full compiler.
8235 PrintF(": is code optimizable: %s, is debugger enabled: %s]\n",
8251 function->ReplaceCode(function->shared()->code());
8252 return function->code();
8254 function->shared()->code()->set_profiler_ticks(0);
8258 return function->code();
8265 function->ReplaceCode(function->shared()->code());
8266 return function->code();
8275 function->ReplaceCode(function->shared()->code());
8278 function->shared()->code()->set_profiler_ticks(0);
8291 return function->code();
8297 Code* code_;
8300 explicit ActivationsFinder(Code* code)
8301 : code_(code),
8338 Handle<Code> optimized_code = deoptimizer->compiled_code();
8340 ASSERT(optimized_code->kind() == Code::OPTIMIZED_FUNCTION);
8352 // the optimized code around.
8357 // Search for other activations of the same function and code.
8363 if (function->code() == *optimized_code) {
8365 PrintF("[removing optimized code for: ");
8369 function->ReplaceCode(function->shared()->code());
8372 // TODO(titzer): we should probably do DeoptimizeCodeList(code)
8373 // unconditionally if the code is not already marked for deoptimization.
8377 // Evict optimized code for this function from the cache so that it doesn't
8410 Code* unoptimized = function->shared()->code();
8411 if (unoptimized->kind() == Code::FUNCTION) {
8444 Code* unoptimized = function->shared()->code();
8446 unoptimized->kind() == Code::FUNCTION) {
8449 for (int i = 0; i <= Code::kMaxLoopNestingMarker; i++) {
8524 // selected for on-stack replacement. Find the unoptimized code object.
8525 Handle<Code> unoptimized(function->shared()->code(), isolate);
8545 // unoptimized code.
8552 // Use linear search of the unoptimized code's back edge table to find
8576 // Try to compile the optimized code. A true return value from
8582 function->code()->deoptimization_data());
8585 PrintF("[on-stack replacement offset %d in optimized code]\n",
8599 // Revert to the original interrupt calls in the original unoptimized code.
8606 Handle<Code> interrupt_code = interrupt_stub.GetCode(isolate);
8607 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement();
8616 ASSERT(function->code()->kind() == Code::OPTIMIZED_FUNCTION);
8620 function->ReplaceCode(function->shared()->code());
8803 // A smi sentinel indicates a context nested inside global code rather
8829 // A smi sentinel indicates a context nested inside global code rather
8854 // A smi sentinel indicates a context nested inside global code rather
9371 // If we have a string, assume it's a code "marker"
9516 // No callback set and code generation disallowed.
9519 // Callback set. Let it decide if code generation is allowed.
9535 // Check if native context allows code generation from
9567 // Check if native context allows code generation from
9626 // Use as fallback for allocation in generated code when the space
10692 // GC can happen later in this code so put the required fields into
11016 // Find source position in unoptimized code.
11272 // TODO(yangguo): make sure all code deoptimized when debugger is active
11690 // Reparse the code and analyze the scopes.
11694 // Check whether we are in global, eval or function code.
11697 // Global or eval code.
11711 // Function code
11959 int source_position = shared_info->code()->SourcePosition(frame_->pc());
12531 // Do not materialize the arguments object for eval or top-level code.
12993 func->code()->PrintLn();
13098 // all generated code keeps references to this particular instance of script.
13158 // Replaces code of SharedFunctionInfo with a new one.
13196 // In a code of a parent function replaces original function as embedded object
13307 Handle<Code> code(function->code(), isolate);
13309 if (code->kind() != Code::FUNCTION &&
13310 code->kind() != Code::OPTIMIZED_FUNCTION) {
13314 RelocIterator it(*code, RelocInfo::ModeMask(RelocInfo::STATEMENT_POSITION));
13323 static_cast<int>(it.rinfo()->pc() - code->instruction_start());
13336 // This is used in unit tests to run code as if debugger is entered or simply
13786 // TODO(cira): Include currency parsing code using parseCurrency call.
13789 // code and the value).
13934 // element segments each containing a receiver, function, code and
13935 // native code offset.
14132 // Exclude the code in release mode.
14451 // Non-recoverable failure. Calling code must restart heap