| Index: src/assembler.cc
|
| ===================================================================
|
| --- src/assembler.cc (revision 6800)
|
| +++ src/assembler.cc (working copy)
|
| @@ -67,9 +67,10 @@
|
|
|
| const double DoubleConstant::min_int = kMinInt;
|
| const double DoubleConstant::one_half = 0.5;
|
| +const double DoubleConstant::minus_zero = -0.0;
|
| const double DoubleConstant::negative_infinity = -V8_INFINITY;
|
| +const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING";
|
|
|
| -
|
| // -----------------------------------------------------------------------------
|
| // Implementation of Label
|
|
|
| @@ -553,8 +554,9 @@
|
| : address_(Redirect(Builtins::c_function_address(id))) {}
|
|
|
|
|
| -ExternalReference::ExternalReference(ApiFunction* fun)
|
| - : address_(Redirect(fun->address())) {}
|
| +ExternalReference::ExternalReference(
|
| + ApiFunction* fun, Type type = ExternalReference::BUILTIN_CALL)
|
| + : address_(Redirect(fun->address(), type)) {}
|
|
|
|
|
| ExternalReference::ExternalReference(Builtins::Name name)
|
| @@ -648,6 +650,11 @@
|
| }
|
|
|
|
|
| +ExternalReference ExternalReference::arguments_marker_location() {
|
| + return ExternalReference(Factory::arguments_marker().location());
|
| +}
|
| +
|
| +
|
| ExternalReference ExternalReference::roots_address() {
|
| return ExternalReference(Heap::roots_address());
|
| }
|
| @@ -730,6 +737,12 @@
|
| }
|
|
|
|
|
| +ExternalReference ExternalReference::address_of_minus_zero() {
|
| + return ExternalReference(reinterpret_cast<void*>(
|
| + const_cast<double*>(&DoubleConstant::minus_zero)));
|
| +}
|
| +
|
| +
|
| ExternalReference ExternalReference::address_of_negative_infinity() {
|
| return ExternalReference(reinterpret_cast<void*>(
|
| const_cast<double*>(&DoubleConstant::negative_infinity)));
|
| @@ -832,8 +845,8 @@
|
| return power_double_int(x, y_int); // Returns 1.0 for exponent 0.
|
| }
|
| if (!isinf(x)) {
|
| - if (y == 0.5) return sqrt(x);
|
| - if (y == -0.5) return 1.0 / sqrt(x);
|
| + if (y == 0.5) return sqrt(x + 0.0); // -0 must be converted to +0.
|
| + if (y == -0.5) return 1.0 / sqrt(x + 0.0);
|
| }
|
| if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) {
|
| return OS::nan_value();
|
| @@ -882,17 +895,18 @@
|
| UNREACHABLE();
|
| }
|
| // Passing true as 2nd parameter indicates that they return an fp value.
|
| - return ExternalReference(Redirect(FUNCTION_ADDR(function), true));
|
| + return ExternalReference(Redirect(FUNCTION_ADDR(function), FP_RETURN_CALL));
|
| }
|
|
|
|
|
| ExternalReference ExternalReference::compare_doubles() {
|
| return ExternalReference(Redirect(FUNCTION_ADDR(native_compare_doubles),
|
| - false));
|
| + BUILTIN_CALL));
|
| }
|
|
|
|
|
| -ExternalReferenceRedirector* ExternalReference::redirector_ = NULL;
|
| +ExternalReference::ExternalReferenceRedirector*
|
| + ExternalReference::redirector_ = NULL;
|
|
|
|
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| @@ -911,6 +925,11 @@
|
| ASSERT(pos != RelocInfo::kNoPosition);
|
| ASSERT(pos >= 0);
|
| state_.current_position = pos;
|
| +#ifdef ENABLE_GDB_JIT_INTERFACE
|
| + if (gdbjit_lineinfo_ != NULL) {
|
| + gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false);
|
| + }
|
| +#endif
|
| }
|
|
|
|
|
| @@ -918,6 +937,11 @@
|
| ASSERT(pos != RelocInfo::kNoPosition);
|
| ASSERT(pos >= 0);
|
| state_.current_statement_position = pos;
|
| +#ifdef ENABLE_GDB_JIT_INTERFACE
|
| + if (gdbjit_lineinfo_ != NULL) {
|
| + gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true);
|
| + }
|
| +#endif
|
| }
|
|
|
|
|
|
|