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

Side by Side Diff: src/assembler.h

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/array.js ('k') | src/assembler.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // in the relocation information. Two types of source positions are collected 170 // in the relocation information. Two types of source positions are collected
171 // "position" (RelocMode position) and "statement position" (RelocMode 171 // "position" (RelocMode position) and "statement position" (RelocMode
172 // statement_position). The "position" is collected at places in the source 172 // statement_position). The "position" is collected at places in the source
173 // code which are of interest when making stack traces to pin-point the source 173 // code which are of interest when making stack traces to pin-point the source
174 // location of a stack frame as close as possible. The "statement position" is 174 // location of a stack frame as close as possible. The "statement position" is
175 // collected at the beginning at each statement, and is used to indicate 175 // collected at the beginning at each statement, and is used to indicate
176 // possible break locations. kNoPosition is used to indicate an 176 // possible break locations. kNoPosition is used to indicate an
177 // invalid/uninitialized position value. 177 // invalid/uninitialized position value.
178 static const int kNoPosition = -1; 178 static const int kNoPosition = -1;
179 179
180 // This string is used to add padding comments to the reloc info in cases
181 // where we are not sure to have enough space for patching in during
182 // lazy deoptimization. This is the case if we have indirect calls for which
183 // we do not normally record relocation info.
184 static const char* kFillerCommentString;
185
186 // The minimum size of a comment is equal to three bytes for the extra tagged
187 // pc + the tag for the data, and kPointerSize for the actual pointer to the
188 // comment.
189 static const int kMinRelocCommentSize = 3 + kPointerSize;
190
191 // The maximum size for a call instruction including pc-jump.
192 static const int kMaxCallSize = 6;
193
180 enum Mode { 194 enum Mode {
181 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). 195 // Please note the order is important (see IsCodeTarget, IsGCRelocMode).
182 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. 196 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor.
183 CODE_TARGET_CONTEXT, // Code target used for contextual loads. 197 CODE_TARGET_CONTEXT, // Code target used for contextual loads and stores.
184 DEBUG_BREAK, // Code target for the debugger statement. 198 DEBUG_BREAK, // Code target for the debugger statement.
185 CODE_TARGET, // Code target which is not any of the above. 199 CODE_TARGET, // Code target which is not any of the above.
186 EMBEDDED_OBJECT, 200 EMBEDDED_OBJECT,
187 GLOBAL_PROPERTY_CELL, 201 GLOBAL_PROPERTY_CELL,
188 202
189 // Everything after runtime_entry (inclusive) is not GC'ed. 203 // Everything after runtime_entry (inclusive) is not GC'ed.
190 RUNTIME_ENTRY, 204 RUNTIME_ENTRY,
191 JS_RETURN, // Marks start of the ExitJSFrame code. 205 JS_RETURN, // Marks start of the ExitJSFrame code.
192 COMMENT, 206 COMMENT,
193 POSITION, // See comment for kNoPosition above. 207 POSITION, // See comment for kNoPosition above.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 473
460 474
461 // An ExternalReference represents a C++ address used in the generated 475 // An ExternalReference represents a C++ address used in the generated
462 // code. All references to C++ functions and variables must be encapsulated in 476 // code. All references to C++ functions and variables must be encapsulated in
463 // an ExternalReference instance. This is done in order to track the origin of 477 // an ExternalReference instance. This is done in order to track the origin of
464 // all external references in the code so that they can be bound to the correct 478 // all external references in the code so that they can be bound to the correct
465 // addresses when deserializing a heap. 479 // addresses when deserializing a heap.
466 class ExternalReference BASE_EMBEDDED { 480 class ExternalReference BASE_EMBEDDED {
467 public: 481 public:
468 // Used in the simulator to support different native api calls. 482 // Used in the simulator to support different native api calls.
469 //
470 // BUILTIN_CALL - builtin call.
471 // MaybeObject* f(v8::internal::Arguments).
472 //
473 // FP_RETURN_CALL - builtin call that returns floating point.
474 // double f(double, double).
475 //
476 // DIRECT_CALL - direct call to API function native callback
477 // from generated code.
478 // Handle<Value> f(v8::Arguments&)
479 //
480 enum Type { 483 enum Type {
484 // Builtin call.
485 // MaybeObject* f(v8::internal::Arguments).
481 BUILTIN_CALL, // default 486 BUILTIN_CALL, // default
487
488 // Builtin call that returns floating point.
489 // double f(double, double).
482 FP_RETURN_CALL, 490 FP_RETURN_CALL,
483 DIRECT_CALL 491
492 // Direct call to API function callback.
493 // Handle<Value> f(v8::Arguments&)
494 DIRECT_API_CALL,
495
496 // Direct call to accessor getter callback.
497 // Handle<value> f(Local<String> property, AccessorInfo& info)
498 DIRECT_GETTER_CALL
484 }; 499 };
485 500
486 typedef void* ExternalReferenceRedirector(void* original, Type type); 501 typedef void* ExternalReferenceRedirector(void* original, Type type);
487 502
488 explicit ExternalReference(Builtins::CFunctionId id); 503 explicit ExternalReference(Builtins::CFunctionId id);
489 504
490 explicit ExternalReference(ApiFunction* ptr, Type type); 505 explicit ExternalReference(ApiFunction* ptr, Type type);
491 506
492 explicit ExternalReference(Builtins::Name name); 507 explicit ExternalReference(Builtins::Name name);
493 508
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 static ExternalReference handle_scope_level_address(); 586 static ExternalReference handle_scope_level_address();
572 587
573 static ExternalReference scheduled_exception_address(); 588 static ExternalReference scheduled_exception_address();
574 589
575 // Static variables containing common double constants. 590 // Static variables containing common double constants.
576 static ExternalReference address_of_min_int(); 591 static ExternalReference address_of_min_int();
577 static ExternalReference address_of_one_half(); 592 static ExternalReference address_of_one_half();
578 static ExternalReference address_of_minus_zero(); 593 static ExternalReference address_of_minus_zero();
579 static ExternalReference address_of_negative_infinity(); 594 static ExternalReference address_of_negative_infinity();
580 595
596 static ExternalReference math_sin_double_function();
597 static ExternalReference math_cos_double_function();
598 static ExternalReference math_log_double_function();
599
581 Address address() const {return reinterpret_cast<Address>(address_);} 600 Address address() const {return reinterpret_cast<Address>(address_);}
582 601
583 #ifdef ENABLE_DEBUGGER_SUPPORT 602 #ifdef ENABLE_DEBUGGER_SUPPORT
584 // Function Debug::Break() 603 // Function Debug::Break()
585 static ExternalReference debug_break(); 604 static ExternalReference debug_break();
586 605
587 // Used to check if single stepping is enabled in generated code. 606 // Used to check if single stepping is enabled in generated code.
588 static ExternalReference debug_step_in_fp_address(); 607 static ExternalReference debug_step_in_fp_address();
589 #endif 608 #endif
590 609
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 return num_bits_set; 790 return num_bits_set;
772 } 791 }
773 792
774 // Computes pow(x, y) with the special cases in the spec for Math.pow. 793 // Computes pow(x, y) with the special cases in the spec for Math.pow.
775 double power_double_int(double x, int y); 794 double power_double_int(double x, int y);
776 double power_double_double(double x, double y); 795 double power_double_double(double x, double y);
777 796
778 } } // namespace v8::internal 797 } } // namespace v8::internal
779 798
780 #endif // V8_ASSEMBLER_H_ 799 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698