all-in-one


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent de5b4605
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "v8threads.h" #include "v8threads.h"
namespace i = v8::internal;
#define LOG_API(expr) LOG(ApiEntryCall(expr)) #define LOG_API(expr) LOG(ApiEntryCall(expr))
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include "platform.h" #include "platform.h"
#include "top.h" #include "top.h"
using namespace v8::internal;
static int fatal_error_handler_nesting_depth = 0; static int fatal_error_handler_nesting_depth = 0;
// Contains protection against recursive calls (faults while handling faults). // Contains protection against recursive calls (faults while handling faults).
...@@ -41,21 +39,21 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { ...@@ -41,21 +39,21 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) {
fatal_error_handler_nesting_depth++; fatal_error_handler_nesting_depth++;
// First time we try to print an error message // First time we try to print an error message
if (fatal_error_handler_nesting_depth < 2) { if (fatal_error_handler_nesting_depth < 2) {
OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, line); i::OS::PrintError("\n\n#\n# Fatal error in %s, line %d\n# ", file, line);
va_list arguments; va_list arguments;
va_start(arguments, format); va_start(arguments, format);
OS::VPrintError(format, arguments); i::OS::VPrintError(format, arguments);
va_end(arguments); va_end(arguments);
OS::PrintError("\n#\n\n"); i::OS::PrintError("\n#\n\n");
} }
// First two times we may try to print a stack dump. // First two times we may try to print a stack dump.
if (fatal_error_handler_nesting_depth < 3) { if (fatal_error_handler_nesting_depth < 3) {
if (FLAG_stack_trace_on_abort) { if (i::FLAG_stack_trace_on_abort) {
// Call this one twice on double fault // Call this one twice on double fault
Top::PrintStack(); i::Top::PrintStack();
} }
} }
OS::Abort(); i::OS::Abort();
} }
...@@ -90,11 +88,11 @@ void CheckNonEqualsHelper(const char* file, ...@@ -90,11 +88,11 @@ void CheckNonEqualsHelper(const char* file,
void API_Fatal(const char* location, const char* format, ...) { void API_Fatal(const char* location, const char* format, ...) {
OS::PrintError("\n#\n# Fatal error in %s\n# ", location); i::OS::PrintError("\n#\n# Fatal error in %s\n# ", location);
va_list arguments; va_list arguments;
va_start(arguments, format); va_start(arguments, format);
OS::VPrintError(format, arguments); i::OS::VPrintError(format, arguments);
va_end(arguments); va_end(arguments);
OS::PrintError("\n#\n\n"); i::OS::PrintError("\n#\n\n");
OS::Abort(); i::OS::Abort();
} }
...@@ -141,6 +141,7 @@ const Address kFromSpaceZapValue = reinterpret_cast<Address>(0xbeefdad); ...@@ -141,6 +141,7 @@ const Address kFromSpaceZapValue = reinterpret_cast<Address>(0xbeefdad);
class AccessorInfo; class AccessorInfo;
class Allocation; class Allocation;
class Arguments;
class Assembler; class Assembler;
class BreakableStatement; class BreakableStatement;
class Code; class Code;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
namespace v8 { namespace internal { namespace v8 { namespace internal {
static unibrow::Mapping<unibrow::Ecma262Canonicalize> canonicalize; static unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize;
static bool BackRefMatchesNoCase(int from, static bool BackRefMatchesNoCase(int from,
...@@ -50,8 +50,8 @@ static bool BackRefMatchesNoCase(int from, ...@@ -50,8 +50,8 @@ static bool BackRefMatchesNoCase(int from,
unibrow::uchar old_char = subject[from++]; unibrow::uchar old_char = subject[from++];
unibrow::uchar new_char = subject[current++]; unibrow::uchar new_char = subject[current++];
if (old_char == new_char) continue; if (old_char == new_char) continue;
canonicalize.get(old_char, '\0', &old_char); interp_canonicalize.get(old_char, '\0', &old_char);
canonicalize.get(new_char, '\0', &new_char); interp_canonicalize.get(new_char, '\0', &new_char);
if (old_char != new_char) { if (old_char != new_char) {
return false; return false;
} }
......
...@@ -84,7 +84,7 @@ namespace v8 { namespace internal { ...@@ -84,7 +84,7 @@ namespace v8 { namespace internal {
type name = NumberTo##Type(obj); type name = NumberTo##Type(obj);
// Non-reentrant string buffer for efficient general use in this file. // Non-reentrant string buffer for efficient general use in this file.
static StaticResource<StringInputBuffer> string_input_buffer; static StaticResource<StringInputBuffer> runtime_string_input_buffer;
static Object* IllegalOperation() { static Object* IllegalOperation() {
...@@ -2315,7 +2315,7 @@ static Object* Runtime_URIEscape(Arguments args) { ...@@ -2315,7 +2315,7 @@ static Object* Runtime_URIEscape(Arguments args) {
int escaped_length = 0; int escaped_length = 0;
int length = source->length(); int length = source->length();
{ {
Access<StringInputBuffer> buffer(&string_input_buffer); Access<StringInputBuffer> buffer(&runtime_string_input_buffer);
buffer->Reset(source); buffer->Reset(source);
while (buffer->has_more()) { while (buffer->has_more()) {
uint16_t character = buffer->GetNext(); uint16_t character = buffer->GetNext();
...@@ -2343,7 +2343,7 @@ static Object* Runtime_URIEscape(Arguments args) { ...@@ -2343,7 +2343,7 @@ static Object* Runtime_URIEscape(Arguments args) {
StringShape dshape(destination); StringShape dshape(destination);
int dest_position = 0; int dest_position = 0;
Access<StringInputBuffer> buffer(&string_input_buffer); Access<StringInputBuffer> buffer(&runtime_string_input_buffer);
buffer->Rewind(); buffer->Rewind();
while (buffer->has_more()) { while (buffer->has_more()) {
uint16_t chr = buffer->GetNext(); uint16_t chr = buffer->GetNext();
...@@ -2579,7 +2579,7 @@ static Object* ConvertCase(Arguments args, ...@@ -2579,7 +2579,7 @@ static Object* ConvertCase(Arguments args,
// Convert all characters to upper case, assuming that they will fit // Convert all characters to upper case, assuming that they will fit
// in the buffer // in the buffer
Access<StringInputBuffer> buffer(&string_input_buffer); Access<StringInputBuffer> buffer(&runtime_string_input_buffer);
buffer->Reset(s); buffer->Reset(s);
unibrow::uchar chars[Converter::kMaxWidth]; unibrow::uchar chars[Converter::kMaxWidth];
int i = 0; int i = 0;
......
...@@ -92,4 +92,6 @@ class V8 : public AllStatic { ...@@ -92,4 +92,6 @@ class V8 : public AllStatic {
} } // namespace v8::internal } } // namespace v8::internal
namespace i = v8::internal;
#endif // V8_V8_H_ #endif // V8_V8_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment